import java.util.Scanner;

/**
 * 汉明距离
 */
public class HammingDistance {

    private int hammingDistance(int x, int y) {
        return Integer.bitCount(x ^ y);
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count;
        for (int i = 0; i < 3; i++) {
            count = new HammingDistance().hammingDistance(scanner.nextInt(), scanner.nextInt());
            System.out.println(count);
        }
    }
}
